import { createRouter, createWebHistory } from 'vue-router'
import login from '../components/login.vue'
import mainPage from '../components/ParentContainer.vue'
// import Detail from '../components/views/Detail.vue'
import Home from '../views/Home.vue' 


const routes = [
  {
    path: '/',                // 首页路由
    component: login
  },
  {
    path: '/main',                // 首页路由
    component: mainPage
  },
  {
    path: '/home',
    name: 'Home',
    component: Home // 首页路由必须指向实际页面组件
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router